package com.zhixiang.wbl.visitor.model.login;

import com.zhixiang.wbl.visitor.Constant.Constant;
import com.zhixiang.wbl.visitor.bean.BaseBean;

/**
 * Created by dongzhixiang on 16/5/17.
 */
public class Visitor extends BaseBean
{
    private int age;
    private String createAt;
    private int id;
    private String mobile;
    private String name;
    private String password;
    private String portrait;
    private String sex;
    private String updateAt;
    private String username;


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }
    public void setId(String id)
    {
        this.id = Integer.parseInt(id);
    }
    public String getName() {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public String getAge() {
        return age+"岁";
    }

    public void setAge(int age) {
        this.age = age;
    }
    public void setAge(String age) {
        this.age = Integer.parseInt(age);
    }
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getPortrait() {
        return Constant.BANNER_URL_PRE+portrait;
    }

    public void setPortrait(String portrait) {
        this.portrait = portrait;
    }

    public String getSex()
    {

        return sex.equals("1")?"男":"女";
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getCreateAt() {
        return createAt;
    }

    public void setCreateAt(String create_At) {
        this.createAt = create_At;
    }

    public void setUpdateAt(String updateAt){
        this.updateAt = updateAt;
    }
    public String getUpdateAt(){
        return this.updateAt;
    }

    @Override
    public String toString() {
        return "Visitor{" +
                "age=" + age +
                ", createAt='" + createAt + '\'' +
                ", id=" + id +
                ", mobile='" + mobile + '\'' +
                ", name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", portrait='" + portrait + '\'' +
                ", sex='" + sex + '\'' +
                ", updateAt='" + updateAt + '\'' +
                ", username='" + username + '\'' +
                '}';
    }
}
